﻿using System;
using System.Windows;
using System.Collections;

namespace CodeCounsel.SharePoint.RibbonDesigner.View.AttachedBehaviors
{
    public class SelectManager
        : FrameworkElement
    {
        public static readonly DependencyProperty SelectedItemsCollectionProperty =
            DependencyProperty.RegisterAttached("SelectedItems", typeof(IList), typeof(SelectManager),
            new UIPropertyMetadata(false));

        public static IList GetSelectedItems(DependencyObject obj)
        {
            return (IList)obj.GetValue(SelectedItemsCollectionProperty);
        }

        public static void SetSelectedItems(DependencyObject obj, IList items)
        {
            obj.SetValue(SelectedItemsCollectionProperty, items);
        }
    }
}
